
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src='../dist/bundle.js'></script>
</head>
<body>
    <div c-tpl='todos'>
        <input type='text' :value='current' /> 
        <button :click='list.push(current); current = "";'>add</button>~current~
        <ul>
        ~ each index,item in list ~
            <li>
                ~item~
                <a href='javascript:;' :click='list.splice(index,1)'>delete</a>
            </li>
        ~ end ~
        </ul> 
    </div> 

</body>
</html>

<script>
    var data;
    Cube.set("todos",data = {
        current : '',
        list : [],
    });
</script>